
#ifndef Cell_H
#define Cell_H

#include <stdio.h>
#include <easyx.h>
#include<math.h>
#include <unordered_map>
#include <memory>
#include <vector>
#include<math.h>
using namespace std;

class State;

class Cell {

public:
	int x;
	int y;
	int color;
	Cell *head = nullptr;
	shared_ptr<Cell> next = nullptr;
	State *state;
	unordered_map<int, bool> qi;
	int idx;

	Cell(int x, int y, int color, Cell head, Cell next, State *state, int idx);

	Cell(int x, int y, int color, State *state, int idx);

	void initQi();

	bool mergeBlock(Cell cell2);

	bool deleteQi(Cell cell2);

	void addQi(Cell cell3);

	int getQiCount();

	int getCount();

};

#endif